-
Notifications
You must be signed in to change notification settings - Fork 771
Improve init command flow #475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Caution Review failedThe pull request is closed. WalkthroughAdds generic typing and overloads to MCPApp tool decorators and LLM factory. Expands CLI with README generation and new quickstart commands. Introduces four example MCP agent servers (reference, elicitation, sampling, notifications) with clients and READMEs. Updates basic template and config. Minor formatting in an example file. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Client as MCP Client App
participant SSE as SSE Transport
participant Server as Elicitation Server (MCPApp)
participant Upstream as Upstream Client (Elicitation)
Note over Client,Server: Elicitation flow: confirm_action
User->>Client: Initiate confirm_action("proceed")
Client->>SSE: send tool.call(confirm_action)
SSE->>Server: deliver request
Server->>Server: Build schema (ConfirmBooking)
alt Upstream elicitation available
Server->>Upstream: elicit(schema, prompt)
Upstream-->>Server: {"confirm": true|false, "notes": "..."}
else Local handler available
Server->>Server: app.context.elicitation_handler(...)
Server-->>Server: result
else No elicitation channels
Server->>Server: default decision
end
Server-->>SSE: return result string
SSE-->>Client: tool.result
Client-->>User: Display result
sequenceDiagram
autonumber
participant Client as Notifications Client
participant SSE as SSE Transport
participant Server as Notifications Server (MCPApp)
participant Upstream as Upstream Session
Note over Client,Server: Notifications tools (best-effort)
Client->>SSE: call notify("hello", "info")
SSE->>Server: invoke notify
Server->>Server: app.logger.info("hello")
Server-->>SSE: "ok"
Client->>SSE: call notify_progress(0.5, "Halfway")
SSE->>Server: invoke notify_progress
alt Upstream available
Server->>Upstream: send_progress_notification(token, 0.5, "Halfway")
Upstream-->>Server: ack
Server-->>SSE: "ok"
else Missing upstream
Server->>Server: log warning
Server-->>SSE: "no-upstream"
end
sequenceDiagram
autonumber
participant Client as Sampling Client
participant SSE as SSE Transport
participant Server as Sampling Server (MCPApp)
participant LLM as Augmented LLM
Note over Client,Server: sample_haiku(topic)
Client->>SSE: call sample_haiku("mountains")
SSE->>Server: invoke tool
Server->>LLM: generate_str("Haiku about mountains", params)
LLM-->>Server: "three-line haiku..."
Server-->>SSE: return string
SSE-->>Client: tool.result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (20)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
add a hello world example
Summary by CodeRabbit